﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;

namespace DataProvider
{
    public class Connection
    {
        private static string connectionString = "Data Source=MICROSOF-CD7CBA\\SQLEXPRESS;Initial Catalog=BDCarol;Integrated Security=True;Pooling=False";

        

        public static SqlConnection GetConnection()
        {
            SqlConnection conn = new SqlConnection(connectionString);
            conn.Open();
            return conn;
        }

        public static void CloseConnection(SqlConnection conn)
        {
            if (conn != null)
            {
                conn.Close();
            }
        }

    }
}
